﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Module.SerializerService
{
    public class MsgSerializer : IMsgSerializer
    {
        public T DeSerialize<T>(string messageObjStr)
        {
            return Helper.FromJson<T>(messageObjStr);
        }

        public object DeSerialize(string content, Type type)
        {
            return Helper.FromJson(content, type);
        }

        public string Serialize<T>(T messageObj)
        {
            return Helper.ToJson(messageObj);
        }
    }
}
